﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ManageModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%:Resources.All_Activate_List%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

	<div class="maincontent">
		<div id="tab">
			<ul>
				<%--<li rel="viewgroup"><%:Html.ActionLink("View Group","Users",new { category = "group"}) %></li>--%>
				<li rel="viewcompany"><%:Html.ActionLink(Resources.All_User_List,"Users",new { category = "company"}) %></li>
				<li rel="createuser" class="current"><%:Html.ActionLink(Resources.All_Activate_List,"Users",new { category = "create"}) %></li>
				<li rel="viewgroup"><%:Html.ActionLink(Resources.All_Applicant_List,"Users",new { category = "new"}) %></li>
			</ul>
		</div>
		 <div id="tabcontent">
			<div class="tab" id="createuser">
					<h2><%:Resources.All_Activate_List%></h2>
					<%if (Model.Msg != null)
					  {  %>
					<h2>
				   <%:Model.Msg %>
					</h2>                    
					<%} %>
					<%if (Model.ErrorMsg != null)
					  {
						  %>
						  <h2>
						  <%:Model.ErrorMsg %>
						  </h2>
						  <%
					  } %>
					<%using (Html.BeginForm("Users","Manage",FormMethod.Post))
					  {%>
					  <table>
					  <tr>
							<td>
							 <div class="cilname">
						   <div class="tips">
								<div class="label"><%:Resources.SendSMS_Tip%></div>
								<div class="content"><%:Resources.Manageuser_Tip_Content_CILAutoComplete%></div>
							</div>						
							<span class="label"><%:Resources.Manageuser_CIL_lbl%></span>
							<span class="input"><input name="cilname" class="cilname" id="cilname"/><input type="button" class="button" value="<%:Resources.All_Add%>" onclick="add()" /></span>					 
						</div>
						</td>
						</tr>
						<tr>
							<td>
							 <div class="aliasemail">
						   <div class="tips">
								<div class="label"><%:Resources.SendSMS_Tip%></div>
								<div class="content"><%:Resources.Manageuser_Tip_Content_Content %></div>
							</div>						
							<span class="label">&nbsp;<%--<%:Resources.Manageuser_CIL_lbl%>--%></span>
							<span class="input"><textarea name="aliasemail" class="aliasemail" id="cillist"><%: Model.aliasemail %></textarea></span>
						<%--	<span class="plus"><img src="<%:Url.Content("~/Content/images/icons/plus.png")%>" width="12" height="12" alt="+" /></span>
							<span class="lessen"><img src="<%:Url.Content("~/Content/images/icons/lessen.png")%>" width="12" height="12" alt="-" /></span>--%>
 
						</div>
						</td>
						</tr>
						<tr>
							<td>
							<div class="isgroupadmin">
							<div class="tips">
								<div class="label"><%:Resources.SendSMS_Tip%></div>
								<div class="content"><%:Resources.Manageuser_Tip_Content_IsAdmin%></div>
							</div>				
							<span class="label"><%:Resources.Manageuser_IsAdmin%></span>
							<span class="input"><label><input name="isgroupadmin" type="radio" value="yes" /><%:Resources.Manageuser_Yes %></label> <label><input name="isgroupadmin" type="radio" value="no" checked="checked" /><%:Resources.Manageuser_No %></label></span>
						</div>  
						</td>
						</tr>
						<tr>
							<td>
							<div class="createuserbutton">
							<span class="label">&nbsp;</span>
							<span class="input"><input name="createuser" type="submit" class="button" value="<%:Resources.All_Add%>" /></span>
						</div> 
						</td>
						</tr>
					  </table>
						 
						<%--<div class="group">
							<div class="tips">
								<div class="label">Tips:</div>
								<div class="content">请选择一个已经存在的Group作为此（批）用户的所属部门。</div>
							</div>						
							<span class="label">Group</span>
							<span class="input"><select class="group"><option>ITG</option><option>HR</option></select></span>

						</div>--%>
						
						<%--<div style="display:none">
							<div class="tips">
								<div class="label">Tips:</div>
								<div class="content">请选择是否激活</div>
							</div>						
							<span class="label">Is Active</span>
							<span class="input"><input name="isactive" type="checkbox" checked="checked"/></span>

						</div>--%>
						 
					<%  } %>
									 
				
				
				 </div> 
		</div>
		</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
	<link href="<%:Url.Content("~/Content/css/createuser.css")%>" rel="stylesheet" type="text/css" />
	<link href="<%:Url.Content("~/Content/css/jquery-ui-1.8.9.custom.css")%>" rel="stylesheet" type="text/css" />
	<script src="<%:Url.Content("~/Content/js/jquery.alcatel.datagrid.js")%>"></script>
	<script src="<%:Url.Content("~/Content/js/jquery.alcatel.createuser.js")%>"></script>
	<script src="<%:Url.Content("~/Scripts/jquery-1.4.4.min.js") %>" type="text/javascript"></script>
	<script src="<%:Url.Content("~/Scripts/jquery-ui-1.8.9.custom.min.js") %>" type="text/javascript"></script>

	<script type="text/javascript">
		  $(document).ready(function () {
			  var $this = $("#manage_CSS")
			  $this.addClass("current")
	})
	$(function () {
		$("#cilname").autocomplete({
			source: "<%: Url.Action("search", "manage")%>",
            minLength: 2     
		});
	});

	function add()
	{
		var newcil = document.getElementById("cilname").value;
		if(newcil == "")
			return;
		var cillist=document.getElementById("cillist").value;
		if(cillist.charAt(cillist.length-1) != ";" && cillist != "")
			cillist += ";";
		cillist = cillist + newcil + ";";
        document.getElementById("cilname").value = "";
        document.getElementById("cillist").value = cillist;
	}

	</script>
	<style>
	.ui-autocomplete {
		max-height: 100px;
		overflow-y: auto;
		/* prevent horizontal scrollbar */
		overflow-x: hidden;
		/* add padding to account for vertical scrollbar */
		padding-right: 20px;
	}
	/* IE 6 doesn't support max-height
	 * we use height instead, but this forces the menu to always be this tall
	 */
	* html .ui-autocomplete {
		height: 100px;
	}
	</style>
</asp:Content>
